<?php
class Locations extends Base_Controller {	
	
	function __construct()
	{		
		parent::__construct();
		$this->load->model('Location_model');
			$this->load->helper("footer_page");
	}
	
	function get_zone_menu()
	{
		$id	= $this->input->post('id');
		$zones	= $this->Location_model->get_zones_menu($id);
		
		foreach($zones as $id=>$z):?>
		
		<option value="<?php echo $id;?>"><?php echo $z;?></option>
		
		<?php endforeach;
	}
	function get_zone_area(){
		$id_zone = $this->input->post("id");
		$area = $this->Location_model->get_zone_areas($id_zone);
		foreach($area as $item):
			echo "<option value='$item->id'> $item->code </option>";
		endforeach;	
	}
}